import * as types from '../constants/MallConstants.js'

const initialState = {
  dataList: []
}

const orderReducer = (state = initialState, action) => {
  console.log('dataList: ', state.dataList)
  switch (action.type) {
    case types.ACTION_ORDER_DELETE:
      console.log(action.index)
      state.dataList.splice(action.index, 1)
      return {
        ...state,
        dataList: state.dataList
      }
      break
    default:
      return state
  }
}
export default orderReducer
